#pragma once

#include "../include/processor.h"
#include "../include/memory.h"
#include <cmath>
#include <vector>
#include <fstream>
#include <cstring>
#include <cstdlib>
#include <iostream>
#include <algorithm>

struct command
{
	byte c_value;
	byte t_reg;
	byte s_reg1;
	byte imm1;
	byte s_reg2;
	byte imm2;
	word imm3;
};

enum CTYPE
{
	SPECIAL,
	CALC,
	LOG,
	MEMOP,
	AVXC,
	AVXM
};
enum CONDITION
{
	NONE,
	EQU,
	LT,
	LE,
	GT,
	GE,
	NEQ,
	ALL
};

void device(byte reg);
void trap(command code);

command loader();
void selector(command code);
void spec(command code);
void calc(command code);
void logic(command code);
void memop(command code);
// void avx_calc(command code);
// void avx_mem(command code);
